home *** CD-ROM | disk | FTP | other *** search
/ The PC-SIG Library 10 / The PC-Sig Library - Shareware for the IBM PC and Compatibles (PC-SIG)(Tenth Edition Disks 1-2804)(1991).iso / PC_SIGCD / 01 / 3 / DISK0130.ZIP / TOOLS.MAN < prev    next >
Text File  |  1983-09-07  |  5KB  |  171 lines

  1. .*
  2. .* Software tools introductory document
  3. .*
  4. .dm ITAL /.sf 3/%1 %2 %3 %4 %5 %6 %7 %8 %9/.sf 0/
  5. .dm BOLD /.sf 2/%1 %2 %3 %4 %5 %6 %7 %8 %9/.sf 0/
  6. .rm 72
  7. .sp 15
  8. .sf 2
  9. .ce 5
  10. Software Tools
  11.  
  12. for the
  13.  
  14. IBM Personal Computer
  15. .sp 26
  16. .sf 0
  17. .sf 1
  18. .fo !Version: 2.0!!Date:    08/01/83!
  19. .sf 0
  20. .bp 1
  21. .hd 0 Introduction
  22. Presented here are some useful tools, which were originally presented
  23. in the book "Software Tools in Pascal" by Brian W. Kernighan and
  24. P. J. Plauger.  The conversion was non-trivial, and in some cases
  25. the tools have been enhanced, but all in all the tools are
  26. very similiar.  Thus, the reader should refer to this book
  27. for extensive descriptions of the commands and how they were
  28. implemented.
  29.  
  30. The commands described on the following pages have several
  31. features in common, as follows:
  32.  
  33. .in 3
  34. .ti -3
  35. 1)@Input and Output from all commands may be redirected to any device.
  36. The commands all read from "Standard Input" and write to "Standard
  37. Output" by default, although some allow filenames to be specified
  38. on the command line.  Most however act only as
  39. .ital filters,
  40. reading from STDIN and writing to STDOUT.  STDIN and STDOUT both
  41. default to the terminal if unspecified.  However, if an argument
  42. of the format "{filename" is found, it will be assumed that STDIN
  43. must come from that file.  Likewise, an argument of the format
  44. "}filename" redirects standard output.  The filename may be
  45. any special device (eg. 'PRN:' or 'LPT1').
  46.  
  47. .bold Note:
  48. Be careful with this.  If you accidentally enter }filename when you
  49. meant to enter {filename, the file is immediately set to 0 bytes
  50. in size (that is, it is destroyed).  A prompt might be nice... if
  51. you can find the time to add it to the 'initio' routine.
  52.  
  53. .bold Note2:
  54. If you are using DOS 2.0, it also allows you to redirect input and output
  55. with the < and > characters.  However, because of a bug in DOS 2.0 or
  56. a bug in the Pascal Runtime routines for I/O, if you redirect input to
  57. one of these utilities using the < character, it will hang the system!
  58. So please be careful to use the { character.  Redirection of output with
  59. the > character should cause no problems.
  60.  
  61. .ti -3
  62. 2)@If an argument is found with the special characters "?" or "*"
  63. in it, it is assumed to be a general name for a filename, and
  64. the argument will be replaced with all files which match the
  65. pattern.  That is, if the argument is '*.fmt' and the files
  66. .ital a.fmt, b.fmt,
  67. and
  68. .ital c.fmt
  69. exist, then giving the command:
  70.  
  71. fmt *.fmt
  72.  
  73. is equivalent to the command:
  74.  
  75. fmt a.fmt b.fmt c.fmt
  76.  
  77. The names will be in sorted order on the command line.
  78.  
  79. .ti -3
  80. 3)@If you need to have an argument with a ?, *, or imbedded blanks
  81. passed to a program, you may place it in double quotes (") or
  82. single quotes ('), or precede a single special character with a
  83. backslash (\).
  84. .bp
  85. .hd 0 Source Code Arrangement
  86. .bold Note:
  87. There is a whole bunch of stuff here, and most of the useful tools
  88. are so large that a hard disk is almost required to load all the
  89. source, object, and include files on the same disk.  I'm sure if
  90. you tried hard enough, it could be done on 2 double sided floppys
  91. however (1 tool at a time).
  92. .sp
  93. All source for each tool is contained in an 'archive' file.
  94. The following archive files exist:
  95. .sp
  96. .nf
  97. ARCHIVE  AR     12621  10-27-82  11:14p
  98. CHARCNT  AR       732  11-03-82   1:44a
  99. ECHOARG  AR       827  10-27-82  11:55p
  100. FINDP    AR      2202  10-27-82  11:50p   <-- Needed for Change
  101. FMT      AR     35615   3-07-83  11:26p
  102. KWIC     AR      1612  11-03-82   8:12p
  103. LINECNT  AR       753  11-03-82   1:43a
  104. MACRO    AR     23691  10-27-82  11:45p
  105. PRIMS    AR     18467  11-02-82  10:51p   <-- General primitives
  106. PRINTF   AR      2809  11-03-82   1:45a
  107. SORTF    AR     15103   1-09-83   1:52p   <-- Needed for Sortf & Kwic
  108. TED      AR     41318  11-03-82   2:11a   <-- Needed for Ted, Findp, & Change
  109. TRANSLIT AR      3798  11-02-82  11:26p
  110. UNIQUE   AR       870  11-03-82   1:49a
  111. UNROTATE AR      1365  11-03-82   1:50a
  112. UTILITY  AR      8388  10-30-82  11:18a   <-- General utilities
  113. WORDCNT  AR       902  11-03-82   1:43a
  114. .fi
  115. .sp
  116. The general procedure to create an executable version of a tool
  117. is as follows:
  118. .sp
  119. .nf
  120.    1) Make sure you have all .DCL, .INC, and .OBJ files on the
  121.       current disk.
  122.    2) Give command 'archive -x y:xxxxx.ar' where "xxxxx" is the name of
  123.       the tool you are building and y: is the disk the .AR file is on.
  124.       This extracts the files from the archive file.
  125.    3) Give command 'mktool xxxxx'.
  126. .fi
  127. .sp
  128. General Notes:
  129. .br
  130. .in +5
  131. 1)@One tricky thing about these tools is they have the type 'STRING'
  132. redefined as 'PACKED ARRAY[1..MAXSTR] of 0..255'.  This is so the
  133. tools are easily portable to any environment (even EBCDIC machines).
  134. .sp
  135. 2)@Even the simplest of these tools has a HUGE runtime .EXE file.
  136. This is because IBM Pascal has a huge runtime library, which for
  137. some reason insists on loading together (even if most of the
  138. routines are unused).
  139. .bp
  140. .im archive.man
  141. .bp
  142. .im change.man
  143. .bp
  144. .im charcnt.man
  145. .bp
  146. .im echoarg.man
  147. .bp
  148. .im findp.man
  149. .bp
  150. .im fmt.man
  151. .bp
  152. .im kwic.man
  153. .bp
  154. .im linecnt.man
  155. .bp
  156. .im macro.man
  157. .bp
  158. .im printf.man
  159. .bp
  160. .im sortf.man
  161. .bp
  162. .im ted.man
  163. .bp
  164. .im translit.man
  165. .bp
  166. .im unique.man
  167. .bp
  168. .im unrotate.man
  169. .bp
  170. .im wordcnt.man
  171.